<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h1 v-if="awesome">Vue is awesome!</h1>
      <!-- v-if和v-else要是并列的兄弟元素 -->
      <h1 v-else>Oh no 😢</h1>

      <!-- template就是空的占位符标签 -->
      <!-- vue自己提供的一个组件 -->
      <template v-if="show === 1">
        <div>1111</div>
        <div>2222</div>
        <div>3333</div>
      </template>
      <template v-else-if="show === 2">
        <div>4444</div>
      </template>
      <template v-else>
        <div>5555</div>
      </template>
    </div>

    <script src="../../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          awesome: false,
          show: 5,
        },
      });
    </script>
  </body>
</html>
